/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dp1.titandevelop.titano.view.admin;

import dp1.titandevelop.titano.bean.Mensajes;
import dp1.titandevelop.titano.persistent.Empleado;
import dp1.titandevelop.titano.persistent.TipoEmpleado;
import dp1.titandevelop.titano.service.EmpleadoService;
import dp1.titandevelop.titano.service.ValidacionService;
import java.awt.Dimension;
import java.util.Date;
import java.util.List;
import javax.swing.JOptionPane;

/**
 *
 * @author chrestean
 */
public class ModulosT_ADM_AENuevo extends javax.swing.JInternalFrame {

    /**
     * Creates new form TitanoInternalSegADMUserNew
     */
    private List<TipoEmpleado> lista;
   private void addList(List<TipoEmpleado> lista) {
        for (int i = 0; i < lista.size(); i++) {
            this.comboTipoEmp.addItem(lista.get(i).getDescripcion());
        }
    }

    public ModulosT_ADM_AENuevo() {
        initComponents();
        EmpleadoService serv = new EmpleadoService();
        lista = serv.buscarTEmpSinOperario();
        addList(lista);
        ValidacionService val = new ValidacionService();
        val.SNumeros(this.txtCel);
        val.SNumeros(this.txtDNI);
        val.SNumeros(this.txtTelefono);
        val.SSoloLetra(this.txtAMaterno);
        val.SSoloLetra(this.txtAPaterno);
        val.SSoloLetra(this.txtNombre);
        val.Longitud(txtCel, 9);
        val.Longitud(txtDNI, 8);
        val.Longitud(txtTelefono, 7);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        nombre = new javax.swing.JLabel();
        apPaterno = new javax.swing.JLabel();
        apMaterno = new javax.swing.JLabel();
        fechaNac = new javax.swing.JLabel();
        DNI = new javax.swing.JLabel();
        telefono = new javax.swing.JLabel();
        celular = new javax.swing.JLabel();
        correo = new javax.swing.JLabel();
        txtNombre = new javax.swing.JTextField();
        txtAPaterno = new javax.swing.JTextField();
        txtAMaterno = new javax.swing.JTextField();
        txtDNI = new javax.swing.JTextField();
        txtTelefono = new javax.swing.JTextField();
        txtCel = new javax.swing.JTextField();
        txtCorreo = new javax.swing.JTextField();
        comboTipoEmp = new javax.swing.JComboBox();
        jLabel3 = new javax.swing.JLabel();
        txtdireccion = new javax.swing.JTextField();
        jLabel1 = new javax.swing.JLabel();
        cmbsexo = new javax.swing.JComboBox();
        jLabel2 = new javax.swing.JLabel();
        txtfechanac = new org.jdesktop.swingx.JXDatePicker();
        botonGuardar = new javax.swing.JButton();
        botonAtras = new javax.swing.JButton();

        setResizable(true);
        setTitle("Nuevo Empleado");
        setToolTipText("");
        setMaximumSize(new java.awt.Dimension(520, 450));
        setMinimumSize(new java.awt.Dimension(520, 450));
        setPreferredSize(new java.awt.Dimension(550, 435));

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Datos Personales", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Lucida Grande", 0, 13))); // NOI18N

        nombre.setText("Nombre");

        apPaterno.setText("Ap. Paterno");

        apMaterno.setText("Ap. Materno");

        fechaNac.setText("Fecha de Nacimiento");

        DNI.setText("DNI");

        telefono.setText("Telefono");

        celular.setText("Celular");

        correo.setText("E-mail");

        txtDNI.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtDNIActionPerformed(evt);
            }
        });

        txtTelefono.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtTelefonoActionPerformed(evt);
            }
        });

        txtCel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtCelActionPerformed(evt);
            }
        });

        comboTipoEmp.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Seleccione" }));
        comboTipoEmp.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                comboTipoEmpActionPerformed(evt);
            }
        });
        comboTipoEmp.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                comboTipoEmpPropertyChange(evt);
            }
        });

        jLabel3.setText("Tipo Empleado");

        txtdireccion.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtdireccionActionPerformed(evt);
            }
        });

        jLabel1.setText("Dirección");

        cmbsexo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Masculino", "Femenino" }));

        jLabel2.setText("Sexo");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addComponent(fechaNac)
                        .addComponent(nombre, javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(apPaterno, javax.swing.GroupLayout.Alignment.LEADING)
                        .addComponent(apMaterno, javax.swing.GroupLayout.Alignment.LEADING))
                    .addComponent(jLabel1)
                    .addComponent(jLabel3)
                    .addComponent(jLabel2))
                .addGap(17, 17, 17)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(txtdireccion)
                        .addGap(28, 28, 28))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(txtAMaterno, javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtAPaterno, javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtNombre, javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtfechanac, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGap(16, 16, 16)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(celular)
                                    .addComponent(correo))
                                .addGap(28, 28, 28))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(DNI)
                                    .addComponent(telefono))
                                .addGap(18, 18, 18)))
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtCorreo, javax.swing.GroupLayout.DEFAULT_SIZE, 123, Short.MAX_VALUE)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                    .addComponent(txtCel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 116, Short.MAX_VALUE)
                                    .addComponent(txtDNI, javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(txtTelefono, javax.swing.GroupLayout.Alignment.LEADING))
                                .addGap(0, 0, Short.MAX_VALUE)))
                        .addContainerGap())
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(cmbsexo, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(comboTipoEmp, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(0, 0, Short.MAX_VALUE))))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(8, 8, 8)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtNombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(nombre)
                    .addComponent(txtDNI, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(DNI))
                .addGap(15, 15, 15)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(txtTelefono, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(telefono))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(apPaterno)
                                    .addComponent(txtAPaterno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(15, 15, 15)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(apMaterno)
                                    .addComponent(txtAMaterno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(celular)
                                .addComponent(txtCel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(15, 15, 15)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtfechanac, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(fechaNac)
                                .addComponent(correo)
                                .addComponent(txtCorreo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                .addGap(15, 15, 15)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel2)
                    .addComponent(cmbsexo, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(15, 15, 15)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel1)
                    .addComponent(txtdireccion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(15, 15, 15)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(comboTipoEmp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel3))
                .addGap(10, 10, 10))
        );

        botonGuardar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/grabar.png"))); // NOI18N
        botonGuardar.setToolTipText("Guardar");
        botonGuardar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonGuardarActionPerformed(evt);
            }
        });

        botonAtras.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/cancelar.png"))); // NOI18N
        botonAtras.setToolTipText("Salir");
        botonAtras.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonAtrasActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(8, 8, 8)
                .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGap(8, 8, 8))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(botonGuardar)
                .addGap(1, 1, 1)
                .addComponent(botonAtras, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(8, 8, 8)
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(8, 8, 8)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(botonGuardar)
                    .addComponent(botonAtras))
                .addContainerGap(20, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void botonAtrasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonAtrasActionPerformed

        ModulosT_ADM_AE admEmp = new ModulosT_ADM_AE();
        this.getParent().add(admEmp);

        Dimension desktopSize = this.getParent().getSize();
        Dimension jInternalFrameSize = admEmp.getSize();
        admEmp.setLocation((desktopSize.width - jInternalFrameSize.width) / 2,
                (desktopSize.height - jInternalFrameSize.height) / 4);

        admEmp.show();
        this.dispose();

    }//GEN-LAST:event_botonAtrasActionPerformed

    private void botonGuardarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonGuardarActionPerformed
       ValidacionService val = new ValidacionService();
        Mensajes mensajes = new Mensajes();
        EmpleadoService empleado = new EmpleadoService();
             if ((val.esVacio(this.txtAMaterno)) || (val.esVacio(this.txtAPaterno)) || (val.esVacio(this.txtCel)) || (val.esVacio(this.txtCorreo))
                    || (val.esVacio(this.txtDNI))|| (val.esFechaVacia(this.txtfechanac)) || (val.esVacio(this.txtNombre)) || (val.esVacio(this.txtTelefono)) || (val.esVacio(this.txtdireccion))) {
                JOptionPane.showInternalMessageDialog(this.getRootPane(), mensajes.getCompletarCampos(), "Aviso", JOptionPane.WARNING_MESSAGE);

            } else {
               if (val.validaCorreo(this.txtCorreo)){
                 List<Empleado> validaremp = empleado.buscarDNI(this.txtDNI.getText());
                    if (!validaremp.isEmpty() ){
                        JOptionPane.showInternalMessageDialog(this.getRootPane(),"DNI ya fue ingresado con anterioridad" , "Aviso", JOptionPane.WARNING_MESSAGE);

                    }else{
                     
                 if (val.LongitudExacta(txtDNI.getText(), 8) && val.LongitudExacta(txtCel.getText(), 9)&& val.LongitudExacta(txtTelefono.getText(), 7)){
                    
                      switch (val.fechaNacimiento(this.txtfechanac,18)){
                        case 1: 
                            JOptionPane.showInternalMessageDialog(this.getRootPane(), mensajes.getFechaposterior(), "Aviso", JOptionPane.WARNING_MESSAGE);
                            break;
                        case 2: 
                            JOptionPane.showInternalMessageDialog(this.getRootPane(), mensajes.getFechamayor(), "Aviso", JOptionPane.WARNING_MESSAGE);
                            break;
                        case 3:   
                        {
                            if (this.comboTipoEmp.getSelectedIndex() - 1 == -1) {
                                    JOptionPane.showInternalMessageDialog(this.getRootPane(),"Ingrese un tipo de empleado", "Aviso", JOptionPane.WARNING_MESSAGE);
                            }
                            else {
                            try {
                                String nombres, apepat, apemat, direcc, dni, sexo, tlf, cel, mail;
                                Date fecha;
                                Integer idtipo;

                                nombres = this.txtNombre.getText(); apepat = this.txtAPaterno.getText(); apemat = this.txtAMaterno.getText();
                                direcc = this.txtdireccion.getText(); dni = this.txtDNI.getText();   tlf = this.txtTelefono.getText();  cel = this.txtCel.getText();  
                                mail = this.txtCorreo.getText();    fecha = this.txtfechanac.getDate();

                                if (this.cmbsexo.getSelectedIndex() == 0) { sexo = "Masculino";} 
                                else { sexo = "Femenino";}

                                
                                    idtipo = lista.get(this.comboTipoEmp.getSelectedIndex() - 1).getIdtipoempleado();
                                    empleado.insertarEmpleado(idtipo, nombres, apepat, apemat, direcc, fecha, dni, sexo, tlf, cel, mail);
    //
                                     JOptionPane.showInternalMessageDialog(this.getRootPane(), mensajes.getRegistrado(), "Mensaje", JOptionPane.INFORMATION_MESSAGE);

                                    ModulosT_ADM.menuEmp = new ModulosT_ADM_AE();
                                    this.getParent().add(ModulosT_ADM.menuEmp);
                                    Dimension desktopSize = this.getParent().getSize();
                                    Dimension jInternalFrameSize = ModulosT_ADM.menuEmp.getSize();
                                    ModulosT_ADM.menuEmp.setLocation((desktopSize.width - jInternalFrameSize.width) / 2,
                                            (desktopSize.height - jInternalFrameSize.height) / 4);
                                    ModulosT_ADM.menuEmp.show();

                                    this.dispose();
                                } catch (Exception e) {

                                    JOptionPane.showInternalMessageDialog(this.getRootPane(),mensajes.getError(),"Error",JOptionPane.ERROR_MESSAGE);
                                }
                            break;
                            }
                        }
                     }
                    }else {
                            if (val.LongitudExacta(txtCel.getText(), 9)){
                             }else{
                                JOptionPane.showInternalMessageDialog(this.getRootPane(), "El celular debe tener 9 digitos ", "Aviso", JOptionPane.WARNING_MESSAGE);
                            }
                            if (val.LongitudExacta(this.txtTelefono.getText(), 7)){
                            }else{
                                JOptionPane.showInternalMessageDialog(this.getRootPane(), "El telefono debe tener 7 digitos ", "Aviso", JOptionPane.WARNING_MESSAGE);
                            }
                            if (val.LongitudExacta(this.txtDNI.getText(), 8)){
                            }else{
                                JOptionPane.showInternalMessageDialog(this.getRootPane(), "El DNI debe tener 8 digitos ", "Aviso", JOptionPane.WARNING_MESSAGE);
                            }
                    }
              }
             }else{
                    JOptionPane.showInternalMessageDialog(this.getRootPane(), "Correo con formato erroneo ", "Aviso", JOptionPane.WARNING_MESSAGE);
               }   
             }
    
    }//GEN-LAST:event_botonGuardarActionPerformed

    private void txtDNIActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtDNIActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtDNIActionPerformed

    private void txtdireccionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtdireccionActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtdireccionActionPerformed

    private void comboTipoEmpActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_comboTipoEmpActionPerformed
  
    }//GEN-LAST:event_comboTipoEmpActionPerformed

    private void comboTipoEmpPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_comboTipoEmpPropertyChange
//        EmpleadoService  emp = new EmpleadoService();
//        if (this.comboTipoEmp.getSelectedIndex()-1 != - 1 ){
//            System.out.print("entre 1");
//               if (lista.get(this.comboTipoEmp.getSelectedIndex()-1).getIdtipoempleado() == emp.idOperario()){
//                   this.btnAsignar.setVisible(true);
//               }else{
//                   this.btnAsignar.setVisible(false);
//               }
//        }
    }//GEN-LAST:event_comboTipoEmpPropertyChange

    private void txtTelefonoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtTelefonoActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtTelefonoActionPerformed

    private void txtCelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtCelActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtCelActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel DNI;
    private javax.swing.JLabel apMaterno;
    private javax.swing.JLabel apPaterno;
    private javax.swing.JButton botonAtras;
    private javax.swing.JButton botonGuardar;
    private javax.swing.JLabel celular;
    private javax.swing.JComboBox cmbsexo;
    private javax.swing.JComboBox comboTipoEmp;
    private javax.swing.JLabel correo;
    private javax.swing.JLabel fechaNac;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JLabel nombre;
    private javax.swing.JLabel telefono;
    private javax.swing.JTextField txtAMaterno;
    private javax.swing.JTextField txtAPaterno;
    private javax.swing.JTextField txtCel;
    private javax.swing.JTextField txtCorreo;
    private javax.swing.JTextField txtDNI;
    private javax.swing.JTextField txtNombre;
    private javax.swing.JTextField txtTelefono;
    private javax.swing.JTextField txtdireccion;
    private org.jdesktop.swingx.JXDatePicker txtfechanac;
    // End of variables declaration//GEN-END:variables
}
